import storage from './storage'

/**
 * 退出登录
 * @description encodeURIComponent 对字符串进行 URL 编码，% 表示十六进制编码的前缀
 */
export const logout = () => {
  storage.remove('token')
  location.href = '/login?callback=' + encodeURIComponent(location.href)
}
